Release 10.1A: OpenEdge Development:
.NET Open Clients


Passing arguments by reference

In .NET, parameters can be passed by value or by reference. Most .NET languages provide a way to declare a parameter’s mode. For example, in C#, parameters are passed by value by default, and you can use ref and out to specify passing the parameter by reference. In Visual Basic .NET, use ByVal and ByRef to identify the parameter mode.

INPUT-OUTPUT parameters

An INPUT-OUTPUT parameter is mapped to its .NET data type, with the parameter mode set based on the .NET language. For example, in C# you would use the ref parameter modifier. The ref modifier requires that the variable be initialized before being passed to a method.

OUTPUT parameters

An OUTPUT parameter is mapped to its .NET data type, with the parameter mode set based on the .NET language. For example, in C# you would use the out parameter modifier. The out modifier does not require that the variable be initialized before being passed to a method.

Note: If the variable already contains a value, it is replaced for INPUT-OUTPUT and OUTPUT parameters.

For more information about parameter passing in .NET, see the documentation for your .NET programming language.


Copyright © 2005 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095